//
//  LawsAndRegulationsViewController.m
//  TenThousand
//
//  Created by 宁宁 on 16/7/25.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "LawsAndRegulationsViewController.h"

@interface LawsAndRegulationsViewController ()

@end

@implementation LawsAndRegulationsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"法律法规";
    
    self.view.backgroundColor = [UIColor colorWithRed:237/255.0 green:237/255.0 blue:237/255.0 alpha:1];
    
    [self setView];
}

- (void)setView{
    //公司运作的合规性
    UILabel *title1 = [[UILabel alloc] initWithFrame:CGRectMake(8, 15, Screen_Width - 16, 20)];
    title1.text = @"公司运作的合规性";
    title1.font = [UIFont boldSystemFontOfSize:16];
    title1.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:title1];
    
    UIView *bgview1 = [[UIView alloc] initWithFrame:CGRectMake(8, title1.frame.origin.y + 25, Screen_Width - 16, 1000)];
    bgview1.backgroundColor = [UIColor whiteColor];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, Screen_Width - 24 - 16, Screen_Height)];
    label1.font = [UIFont systemFontOfSize:14];
    label1.numberOfLines = 0;
    NSString *introduction1 = @"根据《公司法》设立，仅为投资者与产品提供方提供信息服务并进行充分的信息披露，所有交易资金均由银行监管，符合监管机关的监管要求。";
    //设置label行距
    NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:introduction1];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:9];
    [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [introduction1 length])];
    label1.attributedText = attributedString1;
    [label1 sizeToFit];
    
    bgview1.frame = CGRectMake(8, title1.frame.origin.y + 25, Screen_Width - 16, label1.frame.size.height + 24);
    [bgview1 addSubview:label1];
    [self.view addSubview:bgview1];
    
    
    
    //理财模式的合规性
    UILabel *title2 = [[UILabel alloc] initWithFrame:CGRectMake(8, bgview1.frame.origin.y + bgview1.frame.size.height + 15, Screen_Width - 16, 20)];
    title2.text = @"理财模式的合规性";
    title2.font = [UIFont boldSystemFontOfSize:16];
    title2.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:title2];
    
    UIView *bgview2 = [[UIView alloc] initWithFrame:CGRectMake(8, title2.frame.origin.y + 25, Screen_Width - 16, 1000)];
    bgview2.backgroundColor = [UIColor whiteColor];
    
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, Screen_Width - 24 - 16, Screen_Height)];
    label2.font = [UIFont systemFontOfSize:14];
    label2.numberOfLines = 0;
    NSString *introduction2 = @"根据《合同法》规定，平台提供居间服务、民间借贷关系以及投资者获取收益均合法合规；根据《电子签名法》规定，电子合同具有法律效力。";
    //设置label行距
    NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:introduction2];
    [attributedString2 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [introduction2 length])];
    label2.attributedText = attributedString2;
    [label2 sizeToFit];
    
    bgview2.frame = CGRectMake(8, title2.frame.origin.y + 25, Screen_Width - 16, label2.frame.size.height + 24);
    [bgview2 addSubview:label2];
    [self.view addSubview:bgview2];
    
    
    
    
    UILabel *title3 = [[UILabel alloc] initWithFrame:CGRectMake(8, bgview2.frame.origin.y + bgview2.frame.size.height + 25, Screen_Width - 16, 20)];
    title3.text = @"专业法律团队支持";
    title3.font = [UIFont boldSystemFontOfSize:16];
    title3.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:title3];
    
    UIView *bgview3 = [[UIView alloc] initWithFrame:CGRectMake(8, title3.frame.origin.y + 25, Screen_Width - 16, 1000)];
    bgview3.backgroundColor = [UIColor whiteColor];
    
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, Screen_Width - 24 - 16, Screen_Height)];
    label3.font = [UIFont systemFontOfSize:14];
    label3.numberOfLines = 0;
    NSString *introduction3 = @"聘请铁诚律师事务所为萬元富常年的法律顾问，在萬元富业务经营的合规性评估、业务合同的起草与审查、金融产品风险控制等多方面提供法律支持。";
    //设置label行距
    NSMutableAttributedString *attributedString3 = [[NSMutableAttributedString alloc] initWithString:introduction3];
    [attributedString3 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [introduction3 length])];
    label3.attributedText = attributedString3;
    [label3 sizeToFit];
    
    bgview3.frame = CGRectMake(8, title3.frame.origin.y + 25, Screen_Width - 16, label3.frame.size.height + 24);
    [bgview3 addSubview:label3];
    [self.view addSubview:bgview3];
}


@end
